import api from '@/core/Api'
import {Settings} from '@/router/urls'

class Service {
  async getSettings () {
    try {
      let res = await api.aget(Settings.getSettings())
      // console.log(res)
      if (res.data.code === 0) {
        return res.data.data
      }
    } catch (e) {
      console.log(e)
    }
    return []
  }

  save (values) {
    return api.put(Settings.update(), values)
  }
}

export default new Service()
